package com.c6906.vdam.das.model.dto;

import java.util.Objects;

public class ResultInfo<T> {

    private String code;
    private String message;
    private T data;

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return this.data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String toString() {
        return "ResultInfo{code='" + this.code + '\'' + ", message='" + this.message + '\'' + ", data=" + this.data
                + '}';
    }

    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if ((o == null) || (getClass() != o.getClass())) {
            return false;
        }
        ResultInfo that = (ResultInfo) o;

        return (Objects.equals(this.code, that.code)) && (Objects.equals(this.message, that.message))
                && (Objects.equals(this.data, that.data));
    }

    public int hashCode() {
        return Objects.hash(new Object[]{this.code, this.message, this.data});
    }

    public ResultInfo() {
    }
}
